package com.yc.ui.dialog;

import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Text;

import com.yc.utils.SWTUtil;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

public class Pay_upDialog extends Dialog {

	protected Object result;
	protected Shell shell;
	private Text text;
	private Text text_1;
	private Text text_2;
	private Text text_3;
	private Text text_4;
	private Text text_5;
	private Text text_6;
	private Text text_7;

	/**
	 * Create the dialog.
	 * @param parent
	 * @param style
	 */
	public Pay_upDialog(Shell parent, int style) {
		super(parent, style);
		setText("SWT Dialog");
	}

	/**
	 * Open the dialog.
	 * @return the result
	 */
	public Object open() {
		createContents();
		shell.open();
		shell.layout();
		Display display = getParent().getDisplay();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return result;
	}

	/**
	 * Create contents of the dialog.
	 */
	private void createContents() {
		shell = new Shell(getParent(), getStyle());
		shell.setSize(542, 464);
		shell.setText(getText());
		SWTUtil.centerWindow(shell);
		
		Label lblNewLabel = new Label(shell, SWT.NONE);
		lblNewLabel.setBounds(57, 68, 76, 20);
		lblNewLabel.setText("住宿编号");
		
		Label lblNewLabel_1 = new Label(shell, SWT.NONE);
		lblNewLabel_1.setBounds(57, 134, 76, 20);
		lblNewLabel_1.setText("房间号");
		
		Label lblNewLabel_2 = new Label(shell, SWT.NONE);
		lblNewLabel_2.setBounds(57, 202, 76, 20);
		lblNewLabel_2.setText("住宿天数");
		
		Label lblNewLabel_3 = new Label(shell, SWT.NONE);
		lblNewLabel_3.setBounds(57, 270, 76, 20);
		lblNewLabel_3.setText("入住日期");
		
		Label lblNewLabel_4 = new Label(shell, SWT.NONE);
		lblNewLabel_4.setBounds(57, 338, 76, 20);
		lblNewLabel_4.setText("提醒日期");
		
		Label lblNewLabel_5 = new Label(shell, SWT.NONE);
		lblNewLabel_5.setBounds(317, 68, 98, 20);
		lblNewLabel_5.setText("入住天数加：");
		
		Label lblNewLabel_6 = new Label(shell, SWT.NONE);
		lblNewLabel_6.setBounds(317, 134, 90, 20);
		lblNewLabel_6.setText("补交房费数：");
		
		Button btnNewButton = new Button(shell, SWT.NONE);
		btnNewButton.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				
			}
		});
		btnNewButton.setBounds(371, 270, 98, 30);
		btnNewButton.setText("确认补交");
		
		Button btnNewButton_1 = new Button(shell, SWT.NONE);
		btnNewButton_1.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				shell.dispose();
			}
		});
		btnNewButton_1.setBounds(371, 341, 98, 30);
		btnNewButton_1.setText("退出");
		
		text = new Text(shell, SWT.BORDER);
		text.setBounds(163, 65, 127, 26);
		
		text_1 = new Text(shell, SWT.BORDER);
		text_1.setBounds(163, 131, 127, 26);
		
		text_2 = new Text(shell, SWT.BORDER);
		text_2.setBounds(163, 199, 127, 26);
		
		text_3 = new Text(shell, SWT.BORDER);
		text_3.setBounds(163, 267, 127, 26);
		
		text_4 = new Text(shell, SWT.BORDER);
		text_4.setBounds(163, 338, 127, 26);
		
		Label lblNewLabel_6_1 = new Label(shell, SWT.NONE);
		lblNewLabel_6_1.setText("房费总额：");
		lblNewLabel_6_1.setBounds(317, 202, 98, 20);
		
		text_5 = new Text(shell, SWT.BORDER);
		text_5.setBounds(421, 65, 48, 26);
		
		text_6 = new Text(shell, SWT.BORDER);
		text_6.setBounds(421, 131, 48, 26);
		
		text_7 = new Text(shell, SWT.BORDER);
		text_7.setBounds(421, 199, 48, 26);
		
		Label label = new Label(shell, SWT.NONE);
		label.setBounds(475, 68, 34, 20);
		label.setText("元");
		
		Label label_1 = new Label(shell, SWT.NONE);
		label_1.setText("元");
		label_1.setBounds(475, 134, 34, 20);
		
		Label label_2 = new Label(shell, SWT.NONE);
		label_2.setText("元");
		label_2.setBounds(475, 202, 34, 20);

	}

}
